// { "framework": "Vue"} 

/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, {
/******/ 				configurable: false,
/******/ 				enumerable: true,
/******/ 				get: getter
/******/ 			});
/******/ 		}
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = 483);
/******/ })
/************************************************************************/
/******/ ({

/***/ 287:
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var brand = {
  primary: '#ff6600',
  warning: '#e39334',
  success: '#5cb85c',
  danger: '#d9534f'
};
module.exports = {
  tabbar: {
    selectedColor: brand.primary,
    color: '#333'
  },
  brand: brand,
  color: {
    default: '#474747',
    primary: brand.primary,
    gray: '#555'
  }
};

/***/ }),

/***/ 303:
/***/ (function(module, exports) {

module.exports = {
  "scrollbar": {
    "flexDirection": "row",
    "height": "75",
    "lineHeight": "75",
    "borderBottomStyle": "solid",
    "borderBottomWidth": "1",
    "borderBottomColor": "#dddddd"
  },
  "scrollbar-item": {
    "paddingTop": 0,
    "paddingRight": 0,
    "paddingBottom": 0,
    "paddingLeft": 0,
    "height": "75",
    "transitionProperty": "color,transform",
    "transitionDuration": 600,
    "transitionTimingFunction": "ease",
    "transformOrigin": "center center",
    "alignItems": "center",
    "justifyContent": "center"
  },
  "@TRANSITION": {
    "scrollbar-item": {
      "property": "color,transform",
      "duration": 600,
      "timingFunction": "ease"
    }
  },
  "scrollbar-item-text": {
    "color": "#474747",
    "fontSize": "30",
    "marginTop": 0,
    "marginRight": "20",
    "marginBottom": 0,
    "marginLeft": "20",
    "height": "75",
    "lineHeight": "75",
    "borderBottomStyle": "solid",
    "borderBottomWidth": "4",
    "borderBottomColor": "rgba(0,0,0,0)"
  },
  "scrollbar-item-selected-text": {
    "color": "#ff6600",
    "borderBottomStyle": "solid",
    "borderBottomWidth": "4",
    "borderBottomColor": "#ff6600"
  }
}

/***/ }),

/***/ 304:
/***/ (function(module, exports, __webpack_require__) {

"use strict";


//
//
//
//
//
//
//
//
//
//
//
//
//
//

var dom = weex.requireModule('dom');
var theme = __webpack_require__(287);
var offsetAddon = 60;
var COLOR_STYLE = {
  light: {
    color: '#fff',
    line: '#fde85a',
    selectedColor: '#fde85a'
  },
  default: {
    color: theme.color.default,
    selectedColor: theme.color.primary,
    line: theme.brand.primary
  }
};
module.exports = {
  props: {
    itemList: { default: [] },
    colorStyle: { default: 'default' }
  },
  data: function data() {
    return {
      selectedIdx: 0,
      colorStyleMap: COLOR_STYLE
    };
  },
  created: function created() {},

  methods: {
    itemClick: function itemClick(event) {
      var _this = this;

      this.selectedIdx = event.target.attr.idx;
      var itemRef = this.$refs['item' + this.selectedIdx];
      dom.getComponentRect(itemRef[0], function (rs) {
        var left = rs.size.left;
        var width = rs.size.width;
        var shouldBeLeft = null;
        if (left - offsetAddon < 0) {
          shouldBeLeft = offsetAddon;
        } else if (left + width + offsetAddon > 750) {
          shouldBeLeft = 750 - width - offsetAddon;
        }
        if (_this.selectedIdx === 0) {
          shouldBeLeft = 0;
        }
        if (shouldBeLeft !== null) {
          dom.scrollToElement(itemRef[0], { offset: -shouldBeLeft });
        }
      });
      this.$emit('click', this.selectedIdx);
    }
  }
};

/***/ }),

/***/ 305:
/***/ (function(module, exports) {

module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;
  return _c('scroller', {
    staticClass: ["scrollbar"],
    attrs: {
      "scrollDirection": "horizontal",
      "showScrollbar": "false"
    }
  }, [_c('div', {
    staticClass: ["scrollbar"]
  }, _vm._l((_vm.itemList), function(item, i) {
    return _c('div', {
      key: i,
      ref: 'item' + i,
      refInFor: true,
      attrs: {
        "idx": i
      },
      on: {
        "click": _vm.itemClick
      }
    }, [_c('text', {
      class: ['scrollbar-item-text'],
      style: {
        color: i === _vm.selectedIdx ? _vm.colorStyleMap[_vm.colorStyle].selectedColor : _vm.colorStyleMap[_vm.colorStyle].color,
        borderBottomColor: i === _vm.selectedIdx ? _vm.colorStyleMap[_vm.colorStyle].line : 'transparent'
      }
    }, [_vm._v(_vm._s(item.title))])])
  }))])
},staticRenderFns: []}
module.exports.render._withStripped = true

/***/ }),

/***/ 483:
/***/ (function(module, exports, __webpack_require__) {

var __vue_exports__, __vue_options__
var __vue_styles__ = []

/* styles */
__vue_styles__.push(__webpack_require__(303)
)

/* script */
__vue_exports__ = __webpack_require__(304)

/* template */
var __vue_template__ = __webpack_require__(305)
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
if (
  typeof __vue_exports__.default === "object" ||
  typeof __vue_exports__.default === "function"
) {
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")}
__vue_options__ = __vue_exports__ = __vue_exports__.default
}
if (typeof __vue_options__ === "function") {
  __vue_options__ = __vue_options__.options
}
__vue_options__.__file = "/Users/lvling/workspace/米乐购/laxiaoke-app-mz/src/components/scrollbar.vue"
__vue_options__.render = __vue_template__.render
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
__vue_options__._scopeId = "data-v-6292a322"
__vue_options__.style = __vue_options__.style || {}
__vue_styles__.forEach(function (module) {
  for (var name in module) {
    __vue_options__.style[name] = module[name]
  }
})
if (typeof __register_static_styles__ === "function") {
  __register_static_styles__(__vue_options__._scopeId, __vue_styles__)
}

module.exports = __vue_exports__
module.exports.el = 'true'
new Vue(module.exports)


/***/ })

/******/ });